﻿using System.Windows;

namespace Niaofei.WPF.Control
{
    public class Button : System.Windows.Controls.Button
    {
        static Button()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(Button), new FrameworkPropertyMetadata(typeof(Button)));
        }

        /// <summary>
        /// 按钮圆角
        /// </summary>
        public CornerRadius CornerRadius
        {
            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
            set { SetValue(CornerRadiusProperty, value); }
        }

        public static readonly DependencyProperty CornerRadiusProperty =
            DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(Button), new PropertyMetadata(null));

        /// <summary>
        /// 按钮前面内容
        /// </summary>
        public object PreContent
        {
            get { return (object)GetValue(PreContentProperty); }
            set { SetValue(PreContentProperty, value); }
        }

        public static readonly DependencyProperty PreContentProperty =
            DependencyProperty.Register("PreContent", typeof(object), typeof(Button), new PropertyMetadata(null));

        /// <summary>
        /// 按钮后面内容
        /// </summary>
        public object PostContent
        {
            get { return (object)GetValue(PostContentProperty); }
            set { SetValue(PostContentProperty, value); }
        }

        public static readonly DependencyProperty PostContentProperty =
            DependencyProperty.Register("PostContent", typeof(object), typeof(Button), new PropertyMetadata(null));
    }
}
